Library upgrades, replacement of smart optimizer with SASS, formatting

Most of this has been tested for a month or so with no issues so far.