Total refactor of opencart implementation