Finished adding multipart support. Some bug fixes.