#112 refactor code so that is stays compatible with other checkout modules