Incorporated old hti code into new framework