remove optimize function

it isn't used and it doesn't work
remove optimize from http server
remove optimize from https server
Merge pull request #158 from czaks/remove-optimize

Remove optimize function