refactors main function to remove def statements and replace with let bindings
removes lein failures