Code base

Refactored code. Now more tighter in quality.