Fixing -type declarations and pattern matching because of dialyzer errors
Merge pull request #1 from VolatileDream/dialyzer-fix

Fixes for dialyzer errors