Update

Merged Bay code, a lot of things fixed.