Add tests + fix tabs/spaces issue