Add tests and fix buttons