Moved big constants and some functions from header file into cc file to avoid duplication.