Made some smart changes to relaycommand