Changed code to reflect guidelines.