Bug fixes

Fixed variable names and redundant objects. Need to replace tabs with
saces