WIP, refactoring the whole thing to a more c# like pattern