Move objects to lib, and update json