Removed unnecessary type casting and made tables constants