Add button and ajax support, fix js, improved system