Refactored component loading, fixed loading issues.