moving console detections to new parser; improved device detection code; added some doc blocks