Initial V2 commit, does not compile yet, many bugs to fix