[Closes #50, Closes #49, Closes #48] Fixed minor stylistic/security bugs