Tidied up component initialization and registering of subscriptions.