Added basic input validation. To be expanded upon later.