fixed small bug, added strrepresentation for eq and some error checking
removed rest of debug, and main function that existed only for testing