Simplify and refactor code, add usage()