changed word finding mechanism

All leading and trailing spaces are removed.
The same is true with redundant spaces between words.
added support for components
some code from views moved to components directory