added rm filecommand and modded command factory