Added Mahapps and Some Logic