some fixes in JS, removed ctoken, some layout fixes, and more