restructure code, remove jquery