Some fixes and some extra function methods.