cleaning up code and attempting error fixes

ERRORS