Cleaned code. Ready for a new issue