Added some more code - Incomplete though.