Refactoring names

since the application is named spaced, which is a good thing. there is
no need to add MS everywhere, naming should be relevant to the scope it
is defined in.

also added 0 length checking