Added few methods and fixed few queries during selection. 
Added also arguments so that it will be able to create tables with a
bash script.