Major reworking
Major reworking
Major reworking
Added paren balencing