changed where the base conversion and the substring function occur
made the remove subdomain function obsolete
copied the core javascript to a legacy folder to clean the actual file
updated the comments and organized the code, no functional changes