WIP, refactingthe whole thing to a more c# like pattern