fixed spacing, added better error reporting, and fixed a get/post