Fixed dependencies on destroy. Added logic for profile buttons.