Added more comments to the code. Made some renaming. Started library testing.