Fixed tab in getID.
Added various error handling when elements were not found.