Start work on applyProperties and code clean up