merged selector.lua into startup; other minor changes