k-nearest neighbor method implemented. Architecture rebuild.