Added wave functions.
Added more checks for private functions.