Update Main

Started using regex instead of a simple split function.