Made everything work. Now to clean the source.