added more error handling, types to constSTOs, and fixed equality ops