Add comments and use a few constants