Fix command completion and remove compile time warnings