Labels autocomplete

Implementation of small finishes to the labels feature requested by M.Gorodetsky.

Also included is initial, WIP, unit testing using rspec.