Some Refactoring And Minor Changes To Fit Convention