Feature/10

Pull request which implements #10 and mostly cleans the code.