Mostly finished button implementation. Some minor bugs left.