First alpha version, just going for functionality here... will tidy up soon