WPF Functions commented and fixed

edited code for functions and commented out the procedure.