Ver 0.2.1, refactored with some minor fixes