Refactored .scss files
Added the USE_DB switch. Fixed problems with the output scripts functions. Other bug fixes.