Removed unused code
Use Rex.sleep instead of select
return is not needed when it's the last lifunction line