Excluding tests from installation and some cleaning

This fixes a bug in the installation, where setuptools installed the `tests` folder.

Also, I clean a few lines. I'll wait for travis jobs and then merge. I've tested this in my local machine and it works well.