Increase tests and little refactor