Mapserver module Refactoring