Lots of stuff added, only works in Netbeans at the moment