Got things working but its too slow. Right now everything is filled with debug messages. Also added simple test data for regresssion testing