code reorganization

- add method to determine if file is an image file based on its
extension
- remove details. idc, i just wanna sort