Fixed #13, Fixed #9

Groundwork layed for #10