Fix spacing and bugs