Refactored code

Added const paths
Added user control