Cleanup.
Added bare bones dependency checking.