Unit Testing and better practices