Component initialization check added, Constants class modified, and code refactored