refactor laser module to follow coding guidelines as it is meant to be an example