FIX: typo in code
Various fixes and adding class globals