Refactor/components

Work in progress.