Major style refactoring & validation added