A bunch of changes; mostly working now.