Major changes

Added input sanitizing. Still needs work.