Removed useless code; using constants