get index and main coherent and working
fix trailing whitespace, indentation for Grunt
fix up context files
use Set data structures where appropriate, instead of mocking them with regular objects