upgrade to 3.1

Some minor changes to align the module with 3.1 best practice.