Removed unneccessary parts and fixed selection problem.