input refactor
practice input loop refactor
sanitize filename
private methods
general refactor