Adding functions, fix declarations etc. etc.