Minor code changes and closing #33 and #34.