Added basic indexing support.
Added code generation for variable declarations; tweaks in code generation.