public variable consolidation and bug fixes