Refactor. Style guidelines and Builder class.

Adopted PEP8 style and changed Builder class to me more robust.