Moving mask layer factory to a separate file.
Removing unused file.
Updating autotest.