custom ajax scripts and other small java magic