Base Code

Merged from previous code.
To be used for further work.
DO NOT USE CODE FROM OTHER GIT