Refactored hit picking and added initial leap motion support