Refactor command prompt functions and colors