refactored concept mapper: renamed variables, reorganized blocks etc.

note the TODO: extracting the autocomplete bits into a subclass would
improve encapsulation and reduce the surface area of each individual
class
improved efficiency and encapsulation in concept mapper
fixed syntax