Part of v2.0 code

UNFINISHED version of v2.0