[Closes #59, closes #56, closes #58] Fixed minor bugs