bug fixes, restructure clientside to make deployment quicker