Fixes issues 28-34

Please feel free to make modifications to this pull request. Looking forward to seeing your comments.