added shell wrapper for arg parsing and running commands
group main loop and functions together