Refactored Some files / misc changes