added validation, finished up enter key functionaity, and organized js a bit