Implemented most of #10
--background option is still TODO