Very minor changes and removal of unused functions.