update to version 0.5

Added -
Command line interface
Cleaned up boolean logic
Cleaned up order of function defs in source
Renamed function defs for more consistency