Initial commit of partially working script