Various fixes & improvements (see description)

 - Fixed formatting (at least some of it)
 - Fixes from #20
 - Un-commented Communicator, put definition in a function