Refactored to smaller chunks, ensured behaviors loaded and better handling of timings