Global refactoring. Started implementing items.