Bump api version to 2.0, minor code cleanup