new methods
Better use of string replacement
Rewrote some part to follow PEP8