Improved test coverage
Made a few fixes and improved frontend javascript coverage to 95%.