Completely rewritten for version 0.0.3
Cleaner code, remove garbage