more updated features
rearranged some code and headers
minor rearrange of features