Change laser code to use enum