Done right this time

Fixed stuff after seeing how others did it.