Additional Comments and Code Cleanup

Cleaned up the command file selection sub and added additional comments.