Source view window JS magic; also moved to resources;