Closes #14, closes #5, closes #6, closes #4