Coding standards

Some code cleanups so I can sleep easier at night

 - remove unused array indexes that throw notices
 - correct nesting
 - convert to 2sp indenting