Fixing and cleaning up code!. Server is working