Front end changes

Code factoring