updates and bug fixes
Merge pull request #30 from asniper/bugFixes

updates and bug fixes