Current code contains both the shit-programmed version and use of defprotocol to clean the code.