Minor code changes and closing #33 and #34.

Closes #33 and #34.