Added code

Added the code I am currently working on, it is a mess and not
commented but it needs a versioning system ASAP.