Removed redundant code.
Added check to prevent error when user is browsing with frames enabled.
Put PathData class into its own file.