Issues 38 and 41 solved

Mostly, code clean and added the constants appropriately.