Split stuff into functions and a library
Merge pull request #6 from tonk/better_control

Split stuff into functions and a library