More error handling
Fix bugs and stuff