Complete refactor - basic functionality completed