Rewriting and Bug fixes!