remove unecessary code and create 'res' directory if needed