Redo after some problems with codebase.