\usepackage{titles}
\usepackage{headerfooter}
\usepackage{toc}               

%% \usepackage{etoolbox}
%% \makeatletter
%% %\patchcmd{\chapter}{\if@openright\cleardoublepage\else\newpage\fi}{}{}{}
%% %\patchcmd{\chapter}{\newpage}{}{}{}
%% %\patchcmd{\chapter}{\if@openright\clearpage\else\newpage\fi}{}{}{}
%% \patchcmd{\chapter}{\clearpage}{}{}{}
%% \makeatother
