Added serverside input validation
general code cleanup