Improved validation mechanism. Cleaned project.