Made some design changes..Functions now taking contentWidth as parameter