Sime fixes for custom.js (not ready yet)