Added bulk of code to repository