uncomment optimise code in calcAABB(), make it inline and cleanup