added support for file extensions + some minor changes