Variable renaming, bug fixes
Made regex more secure