Cleaned view controller. Prepared input validation.