fixed the order loading issue. TODO: clean up and re-organize js and css