Cleaning up the code

Made some small changes to clean up the code. Used more idiomatic ruby in some places. Also, used a regex to better match signal data in case the message has stuff like double blank spaces.