fixed a bug, performance improvements, got buttons working a little better, misc cleanup