Refactored to support new db tables and connection context. Also split map layer and service actions into two tools.