Added recursiveness
Added caterogies, simplified scanning of file