Additional code and JS cleanup