Adding support for more file types

Resolves #1, #2 and #4