Fabriciocosta/fixing tests

Test passed in Travis!! Some bug fixes. Make works ok now.