Implemented remaining dialog functionality and fixed some warnings.