removed unused db function
moved matrix functions into separate file
moved cube functions into separate file