Finished slicing code generation.
Added tests for subscripts/slicing. Fix some errors.