Fixed minor bugs
Foundation integration continues...