Refactored a lot of the syncing and getting the layer schemas
Fixed a bunch of bugs with syncing