Added header stripping, cleaner code