Version 0.2: Massive cleanup and code rewrite