Refactored collision detection mechanism & few minor tweaks