Closes #50, #41, #40, #42