fixed extra else statement, other small fixes