not sure if the edit means you solved the problem, so i'll post a solution for ya.
If you go to power options you can set what the computer does when you close the lid. Just set that to do nothing. As for the monitor you can simply change the display options to display only on the monitor and not both monitor and laptop screen, and that should solve that.