fixes #12 by running indent on code; refactoring scripts