Implemented missing default factories, corrected bugs.