Renamed constants and implemented logging method.