cleaned up modal window show hide functionality