LUN 367: Code Review; Restructured code