Did some input verification
Clean up