Functional code purpose driven

Completed - no testing done yet , not UI configuration done yet