Fixed boss fight detection and performed some code cleanup