Closes #18
Closes #13
Closes #13 and other fixes