Adding pragma marks and doing some cleanups